Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes

vfsStreamDirectory Class Reference

Inheritance diagram for vfsStreamDirectory:
vfsStreamAbstractContent vfsStreamContainer vfsStreamContent

Public Member Functions

 __construct ($name, $permissions=null)
 size ()
 sizeSummarized ()
 rename ($newName)
 addChild (vfsStreamContent $child)
 removeChild ($name)
 hasChild ($name)
 getChild ($name)
 getChildren ()
 getIterator ()

Protected Member Functions

 getDefaultPermissions ()
 getRealChildName ($name)

Static Protected Member Functions

static getChildName ($name, $ownName)

Protected Attributes

 $children = array()

Constructor & Destructor Documentation

__construct ( name,
permissions = null 
)

constructor

Parameters:
string$name
int$permissionsoptional
Exceptions:
vfsStreamException

Reimplemented from vfsStreamAbstractContent.


Member Function Documentation

addChild ( vfsStreamContent child )

adds child to the directory

Parameters:
vfsStreamContent$child

Implements vfsStreamContainer.

getChild ( name )

returns the child with the given name

Parameters:
string$name
Returns:
vfsStreamContent

Implements vfsStreamContainer.

static getChildName ( name,
ownName 
) [static, protected]

helper method to calculate the child name

Parameters:
string$name
string$ownName
Returns:
string
getChildren (  )

returns a list of children for this directory

Returns:
array<vfsStreamContent>

Implements vfsStreamContainer.

getDefaultPermissions (  ) [protected]

returns default permissions for concrete implementation

Returns:
int
Since:
0.8.0

Reimplemented from vfsStreamAbstractContent.

getIterator (  )

returns iterator for the children

Returns:
vfsStreamContainerIterator
getRealChildName ( name ) [protected]

helper method to detect the real child name

Parameters:
string$name
Returns:
string
hasChild ( name )

checks whether the container contains a child with the given name

Parameters:
string$name
Returns:
bool

Implements vfsStreamContainer.

removeChild ( name )

removes child from the directory

Parameters:
string$name
Returns:
bool

Implements vfsStreamContainer.

rename ( newName )

renames the content

Parameters:
string$newName
Exceptions:
vfsStreamException

Reimplemented from vfsStreamAbstractContent.

size (  )

returns size of directory

The size of a directory is always 0 bytes. To calculate the summarized size of all children in the directory use sizeSummarized().

Returns:
int

Implements vfsStreamContent.

sizeSummarized (  )

returns summarized size of directory and its children

Returns:
int

The documentation for this class was generated from the following file: